﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AuditionShow.aspx.cs" Inherits="DBA.Web.StudentManage.AuditionShow" %>
       <%@ Register Assembly="SqControls" Namespace="SqControls.SqVerification" TagPrefix="cc2" %>

<%@ Register Assembly="SqControls" Namespace="SqControls.SqJqueryManager" TagPrefix="cc1" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" />

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title></title>
<link href="../../Styles/azure/style.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="../../Styles/css/core.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="../../Scripts/lhgdialog/skins/default.css" rel="stylesheet" type="text/css" />
<!--[if IE]>
<link href="themes/css/ieHack.css" rel="stylesheet" type="text/css" media="screen"/>
<![endif]-->
    <script src="../../Scripts/jquery-1.7.1.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.bgiframe.js" type="text/javascript"></script>
<script src="../../Scripts/dwz.core.js" type="text/javascript"></script>
<script src="../../Scripts/dwz.ui.js" type="text/javascript"></script>
<script src="../../Scripts/dwz.sortDrag.js" type="text/javascript"></script>
<script src="../../Scripts/dwz.cssTable.js" type="text/javascript"></script>
<script src="../../Scripts/dwz.stable.js" type="text/javascript"></script>
<script src="../../Scripts/dwz.pagination.js" type="text/javascript"></script>
<script src="../../Scripts/dwz.drag.js" type="text/javascript"></script>
<script src="../../Scripts/dwz.barDrag.js" type="text/javascript"></script>
<script src="../../Scripts/lhgdialog/lhgdialog.js" type="text/javascript"></script>
<script src="../../Scripts/Public.js" type="text/javascript"></script>
<script src="/Scripts/date/WdatePicker.js" type="text/javascript"></script>
<!--
<script src="bin/dwz.min.js" type="text/javascript"></script>
-->
    
    <script type="text/javascript">

        var winAdd;

        function CheckEmployeeID() {
            var obj = $("#txt_TrID").val();
            if (obj == "") {
                alert("请先选择一条该教师的学生面试信息!");
                return false;
            } else {
                return true;
            }
        }

        function searchHandler() {
            if (validateControlsById("tbRoleEdit")) {
                parent.alertMsg.confirm("是否确认执行修改?", {
                    okCall: function () {
                        Public.CallBack("linkBtnUpdate", "");
                    }
                });
            }
        }
        function RefreshGrid() {
            Public.RefreshTable("AspNetPager1");
        }

        function initTable(_box) {
            var $p = $(_box || document);
            //tables
            $("table.table", $p).jTable();
            // css tables
            $('table.list', $p).cssTable();
            addSelectMothod();
        }
        function ddd() {
            $("#dialog-form").dialog("open");
        }
        function addDate() {
            Public.ShowWindow('添加教师进修信息', "/SystemManage/EmployeeManage/EmployeeStudyAdd.aspx?EmpID=" + $("#hdEmpID").val(), 700, 450, null, true);
        }
    </script>
    <script type="text/javascript">
        $(function () {
            //初始化
            DWZ.init("/dwz.frag.xml");
            //必须要加这个不然第一次加载的时候表格数据出不来
            setTimeout("initTable()", 1);
            //updatepanel回调完成后初始化表格
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function () {
                if ($("#hdResult").val() == "1") {
                    alert("操作成功!");
                }
                initTable();
            });

        });
        //批量删除事件
        function deleteSelect() {
            var selectValue = $("#tableBody").getAllSelectedValue().join(",");
            if (selectValue != undefined && selectValue != '') {
                parent.alertMsg.confirm("是否删除选择的信息?", {
                    okCall: function () {
                        $("#hidDeleString").val(selectValue);
                        __doPostBack("linkBtnDeleSelect", "");
                    }
                });
            } else {
                parent.alertMsg.info("请选择要删除要的数据");
            }
        }
        function addSelectMothod() {
            var tbody = $("#tableBody");
            var $trs = tbody.find('>tr');
            $trs.hoverClass().each(function () {
                var $tr = $(this);
                var $ftds = $(">td", this);
                $tr.live("click", function () {
                    var values = $(this).find("span[name='spTrueValue']");
                    $("#txt_Year").val(values[0].innerText);
                    $("#txt_StudentCount").val(values[1].innerText);
                    $("select#ddl_Grade option[value='" + values[2].innerText + "']").attr('selected', 'true');
                    $("#txt_TrID").val($(this).attr("rel"));
                });
            });
        }
	</script>
</head>
<body style="background-color:#fff;">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="pageHeader">
      <div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
                <asp:Panel ID="pan_tab" runat="server">
                  <table id="tbRoleEdit" cellspacing="0" cellpadding="0" style="width: 100%;">
                    <tr>
                        <td class="r_left">
                            教师姓名：</td>
                        <td class="" colspan="5">
                            
                        </td>
                    </tr>
                    <tr>
                        <td class="r_left">
                            年度：<div style="display:none;">
                          <input type="text" id="txt_TrID" runat="server" />
                          </div>
                        </td>
                        <td>
                            <input class="in_sty required" readonly id="txt_Year" type="text" runat="server" style="text-align:left;width:130px;"  onfocus="WdatePicker({dateFmt:'yyyy'})"/>
                        </td>
                        <td class="r_left">
                            面试人数：</td>
                        <td class="">
                            <input class="in_sty required" id="txt_StudentCount" type="text" runat="server" style="text-align:left;width:130px;"/>
                        </td>
                        <td class="r_left">
                            层次：</td>
                        <td class="">
                            <asp:DropDownList ID="ddl_Grade" runat="server">
                                <asp:ListItem Selected="True" Value="0">普研硕士</asp:ListItem>
                                <asp:ListItem Value="1">普研博士</asp:ListItem>
                                <asp:ListItem Value="2">DBA</asp:ListItem>
                                <asp:ListItem Value="3">MBA</asp:ListItem>
                                <asp:ListItem Value="4">EMBA</asp:ListItem>
                                <asp:ListItem Value="5">工程硕士</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                 </table>
                 </asp:Panel>
				</td>            
			</tr>
     
		</table>
        <div style="display:none;">
                    <asp:UpdatePanel ID="UpdatePanel7" runat="server">
                    <ContentTemplate>
                    <asp:HiddenField ID="hdResult" runat="server" />
                    </ContentTemplate>
                    </asp:UpdatePanel>
         </div>
       </div>     
	</div>
<div class="pageContent">
<asp:UpdatePanel runat="server" ID="UpdatePanel3">
<ContentTemplate>
    <asp:HiddenField ID="hdSaveID" runat="server" /> <%--保存选择的类型id--%>   
    <asp:HiddenField ID="hdEmpID" runat="server" />

	<table class="table" width="100%" >
		<thead>
			<tr>                
                <th>年度</th>
                <th>面试人数</th>
                <th>层次</th>
			</tr>
		</thead>
		<tbody id="tableBody">
        <asp:Repeater ID="replData" runat="server">
        <ItemTemplate>
			<tr target="id" rel="<%# Eval("TsID") %>">                
                <td><%# Eval("Year")%><span name="spTrueValue" style="display:none;"><%# Eval("Year")%></span></td>
                <td><%# Eval("StudentCount")%><span name="spTrueValue" style="display:none;"><%# Eval("StudentCount")%></span></td>
                <td><%# ToAuditionGradeString(Eval("Grade"))%><span name="spTrueValue" style="display:none;"><%# Eval("Grade")%></span></td>             
			</tr>
        </ItemTemplate>
        </asp:Repeater>
		</tbody>
	</table>
    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" CustomInfoHTML="<div class='content'>第%CurrentPageIndex%/共%PageCount%页/共%RecordCount%条</div>"
                    FirstPageText="首页" LastPageText="末页" NextPageText="下页"
                    PrevPageText="上页" ShowCustomInfoSection="right" 
        ShowPageIndexBox="Never"  PageSize="10" Width="100%" CustomInfoClass="info"
        CssClass="paginator" onpagechanging="AspNetPager1_PageChanging" >
    </webdiyer:AspNetPager>
     </ContentTemplate>
                </asp:UpdatePanel>
    	
    </div>
   </form>
</body>
</html>
